#ifndef SERVER_H
#define SERVER_H

#include "./common/YXNet.h"
#include "ServerStruct.h"

void accept_request(EventLoop *el, int fd, int mask, void *client_data);
void read_reqeust(EventLoop *el, int fd, int mask, void *client_data);
void send_response(EventLoop *el, int fd, int mask, void *client_data);

int get_file(Request *request, Response *response);
int get_file_basic_info(char *prefix_path, Request *request, Response *response);
int post_file(Request* request, Response *response);

#endif // SERVER_H

#ifndef CONSOLE_H
extern Server server;
#endif
